package com.xyy.saas.payment.dao.mapper;

import com.xyy.saas.payment.dao.model.SettleOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
public interface SettleOrderMapper {
    int deleteByPrimaryKey(Long id);

    int insert(SettleOrder record);

    int insertSelective(SettleOrder record);

    SettleOrder selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SettleOrder record);

    int updateByPrimaryKey(SettleOrder record);

    List<SettleOrder> selectByChannelRoyaltyNo(@Param("channelRoyaltyNo") String channelRoyaltyNo);

    List<SettleOrder> selectListByDay(@Param("royaltyDay") Date royaltyDay, @Param("pageOffset") Integer pageOffset, @Param("pageSize") Integer pageSize);

    Integer selectCountByDay(@Param("royaltyDay") Date royaltyDay);

//    List<SettleOrder> selectListByPayNo(@Param("payNo") String payNo);
//
//    SettleOrder selectByPayNoAndUserId(@Param("payNo") String payNo, @Param("userId") String userId);
//
//    int updateStatusByPayNoAndUserId(@Param("payNo") String payNo, @Param("userId") String userId);
//
//    int updateStatusByPayNos(@Param("successTime") Date successTime, @Param("updateTime") Date updateTime, @Param("status") Byte status, @Param("channelRoyaltyNo") String channelRoyaltyNo, @Param("payNos") List<String> payNos);

    int updateStatusByPrimaryKey(@Param("id") Long id, @Param("status") Byte status, @Param("successTime") Date successTime, @Param("updateTime") Date updateTime, @Param("channelRoyaltyNo") String channelRoyaltyNo);

    int updateStatusByChannelRoyaltyNo(@Param("successTime") Date successTime, @Param("updateTime") Date updateTime, @Param("status") Byte status, @Param("channelRoyaltyNo") String channelRoyaltyNo);
}